﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="/resource/UserPwoer.tld" prefix="p"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="../images/favicon.ico">
<!-- 本框架基本脚本和样式 -->
<script type="text/javascript"
	src="${path }/resource/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript"
	src="${path }/resource/js/systools/MBase.js"></script>

<script type="text/javascript" src="${path }/resource/js/fomatJs.js"></script>

<title></title>
</head>
 
<div class="ibox-content">
	<form class="form-horizontal" id="dataform"
		onsubmit="javascripr:return false;">
	<input type="hidden" name="tokenUrl" value="${tokenUrl}">	 
		<input type="hidden" name="token" value="${token}">
		<c:if test="${obj ne null }">
			<input type="hidden" name="id" value="${obj.id }">
		</c:if>

		<div class="form-group">
			<label class="col-sm-2 control-label">公司名称 <span style="color: red;font-size: 16px;"> *</span></label>
			<div class="col-sm-4">
				<input name="companyName"
					type="text" value="${obj.companyName }"
					class="form-control radius" dataType="*1-500">
			</div>
			<label class="col-sm-2 control-label  ">联系人<span style="color: red;font-size: 16px;"> *</span></label>
			<div class="col-sm-4">
				<input name="contactName"
					type="text" value="${obj.contactName }"
					class="form-control radius" dataType="*1-500">
			</div>
			<div class="Validform_checktip"></div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">联系人职位<span style="color: red;font-size: 16px;"> *</span></label>
			<div class="col-sm-4">
				<input name="contactTel"
					type="text" value="${obj.contactTel }"
					class="form-control radius" dataType="*1-500">
			</div>
			<label class="col-sm-2 control-label  ">联系方式<span style="color: red;font-size: 16px;"> *</span></label>
			<div class="col-sm-4">
				<input name="companyTel"
					type="text" value="${obj.companyTel }"
					class="form-control radius" dataType="m" nullmsg="请输入手机号" errormsg="请输入正确的手机号">
			</div>
			<div class="Validform_checktip"></div>
		</div>

		<div class="form-group">
			<label class="col-sm-2 control-label  ">公司地址<span style="color: red;font-size: 16px;"> *</span></label>
			<div class="col-sm-4">
				<input name="address"
					type="text" value="${obj.address }"
					class="form-control radius" dataType="*1-500" >
			</div>
			<div class="Validform_checktip"></div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label  ">业务往来</label>
			<div class="col-sm-4">
				<input name="introduction"
					type="text" value="${obj.introduction }"
					class="form-control radius" dataType="*1-500" ignore="ignore">
			</div>
			<div class="Validform_checktip"></div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label  ">备注</label>
			<div class="col-sm-4">
				<input name="remark"
					type="text" value="${obj.remark }"
					class="form-control radius" dataType="*1-500" ignore="ignore">
			</div>
			<div class="Validform_checktip"></div>
		</div>
		<input type="hidden" name="fileUrl" id="fileUrl" value="url">
		<div class="form-group">
		<label class="col-sm-2 control-label">文件上传</label>
			<div class="col-sm-8">
				<input onclick="MTools.chooesFile('#fileText2')" value="${obj.fileName }"
					class="input-text upload-url radius form-control" type="text" id="showFileName2"
					readonly style="width: 30%;display: inline;"> 
					<a onclick="MTools.chooesFile('#fileText2')" class="btn btn-primary radius"> 
					<i   class="fa fa-cloud-upload"></i> 浏览文件 </a> 
					<input type="button" class='btn btn-primary radius'onclick="MTools.upFile('#submitBtn2')" value="上传"> 
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label  ">客户账号</label>
			<div class="col-sm-4">
				<input name="account"
					type="text" value="${obj.account }"
					class="form-control radius" dataType="*1-500" ignore="ignore">
			</div>
			<div class="Validform_checktip"></div>
		</div>
		<c:if test="${empty obj.password}">
		<div class="form-group">
			<label class="col-sm-2 control-label  ">客户密码</label>
			<div class="col-sm-4">
				<input name="password"
					type="password" value="${obj.password }"
					class="form-control radius" dataType="*1-500" ignore="ignore">
			</div>
			<div class="Validform_checktip"></div>
		</div>
        </c:if>
		<div class="form-group ">
			<div class="col-sm-12 text-center">
				<a href="javascript:;" onclick="myForm.submit()"
					class="btn btn-success radius">保存</a>&nbsp;&nbsp;&nbsp;&nbsp;
				<button onclick="MTools.closeForm()" class="btn btn-danger radius"
					type="button">取消</button>
			</div>
		</div>
	</form>
	
	<iframe src="" name="blankFrame" id="blankFrame"
				style="height: 100px; width: 100px; display: none;"> </iframe>
	<form class="form form-horizontal" method="post" style="display: none;"
		enctype="multipart/form-data" target="blankFrame" 
	action="${path }/resource/plugin/kindeditor/zking_upload_json.jsp?fileType=file&hiddenId=fileUrl">
		<input id="fileText2" type="file" multiple name="file-1" onchange="MTools.selectFile('#showFileName2','#fileText2','')" /> 
		<input type="submit" id="submitBtn2"/>
	</form>
</div>
<script type="text/javascript">
	
	var myForm = MForm.initForm({
		invokeUrl : "${path}/admin/client/addOrModify",
		afterSubmit : function() {
			parent.myGrid.serchData();
		},
	});
	
	
</script>
</body>
</html>
